<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]',$typeList,$row.type)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Community')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-community" data-rule="required"  data-source="config/value/index" data-field="option_name" data-primary-key="option_id" data-params='{"custom[cid]":2,"custom[pid]":0}' class="form-control selectpage" name="row[community]" type="text" value="{$row.community|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Street')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-street" data-rule="required"  data-source="config/value/index" data-field="option_name" data-primary-key="option_id" data-params='{"custom[cid]":3,"custom[pid]":{$row.community}}' class="form-control selectpage" name="row[street]" type="text" value="{$row.street|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rent')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rent" data-rule="required" class="form-control" name="row[rent]" type="number" value="{$row.rent|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Area')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area" data-rule="required" class="form-control" step="0.01" name="row[area]" type="number" value="{$row.area|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('House_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-house_type" data-rule="required"  class="form-control"  name="row[house_type]" type="text" value="{$row.house_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Floor')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-floor" data-rule="required" class="form-control" name="row[floor]" type="number" value="{$row.floor|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payment_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-payment_type" data-rule="required" class="form-control" name="row[payment_type]" type="text" value="{$row.payment_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Face')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-face" data-rule="required" class="form-control" name="row[face]" type="text" value="{$row.face|htmlentities}">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Check_in')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-check_in" data-rule="required" class="form-control" name="row[check_in]" type="text" value="{$row.check_in|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rent_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rent_type" data-rule="required" data-source="config/value/index" data-field="option_name" data-primary-key="option_id" data-params='{"custom[cid]":6,"custom[pid]":0}' class="form-control selectpage" name="row[rent_type]" type="text" value="{$row.rent_type|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Decoration')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[decoration]',$decorationList, $row.decoration)}
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Deposit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-deposit" data-rule="required" class="form-control" step="0.01" name="row[deposit]" type="number" value="{$row.deposit|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Water_rate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-water_rate" data-rule="required" class="form-control" step="0.01" name="row[water_rate]" type="number" value="{$row.water_rate|htmlentities}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Power_rate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-power_rate" data-rule="required" class="form-control" step="0.01" name="row[power_rate]" type="number" value="{$row.power_rate|htmlentities}" readonly>
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Facilities')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-facilities" data-source="config/value/index" data-field="option_name" data-primary-key="option_id" data-params='{"custom[cid]":4}' data-multiple="true"  class="form-control selectpage"  name="row[facilities]" type="text" value="{$row.facilities|htmlentities}">
        </div>
    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-notice" class="form-control" name="row[notice]" type="text" value="{$row.notice|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_ax')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
            {foreach name="searchList" item="vo"}
            <label for="row[is_ax]-{$key}"><input id="row[is_ax]-{$key}" name="row[is_ax]" type="radio" value="{$key}" {in name="key" value="$row.is_ax"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_recommend')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
            {foreach name="searchList" item="vo"}
            <label for="row[is_recommend]-{$key}"><input id="row[is_recommend]-{$key}" name="row[is_recommend]" type="radio" value="{$key}" {in name="key" value="$row.is_recommend"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tags"  data-source="config/value/index" data-field="option_name" data-primary-key="option_id" data-params='{"custom[cid]":8}' data-multiple="true" class="form-control selectpage"   name="row[tags]" type="text" value="{$row.tags|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|implode=',',###}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-video" class="control-label col-xs-12 col-sm-2">{:__('Video')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video" data-rule="" class="form-control" size="50" name="row[video]" type="text" value="{$row.video}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-video" class="btn btn-danger faupload" data-input-id="c-video" data-mimetype="mp4,webm,mpeg" data-multiple="false" data-preview-id="p-video"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="video/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-video"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-video"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('客服')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-kf" data-source="house/kf/index" data-title = "请选择客服"  class="form-control selectpage"  name="row[kf_id]" type="text" value="{$row.kf_id}">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
